:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4facfe;
    --warning-color: #ffeaa7;
    --background-dark: #0f0f23;
    --background-light: #f8fafc;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-cool: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: white;
    overflow-x: hidden;
}

/* 全局背景 */
.container-fluid {
    background: linear-gradient(135deg, var(--background-light) 0%, white 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.container-fluid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    pointer-events: none;
    z-index: 0;
}

.container-fluid > * {
    position: relative;
    z-index: 1;
}

/* 顶部标题区域 */
.display-4 {
    color: #333;
    font-weight: 900;
    letter-spacing: -1px;
}

.lead {
    color: #666 !important;
    font-weight: 500;
}

/* 现代化按钮 */
.btn-modern-outline {
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    background: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.btn-modern-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    border-color: #667eea;
}

/* 卡片设计 */
.card {
    border-radius: 24px;
    border: none;
    background: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.1);
}

.card-title {
    color: #667eea;
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 1.25rem;
}

/* 网站卡片特殊样式 */
.website-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
    backdrop-filter: blur(10px);
    /* 固定卡片高度确保一致布局 */
    height: 350px;
    display: flex;
    flex-direction: column;
}

.website-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(240, 147, 251, 0.05) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.website-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(102, 126, 234, 0.2);
}

.website-card:hover::after {
    opacity: 1;
}

.website-card .card-inner {
    padding: 25px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.website-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.website-card .website-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.website-card:hover .website-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.website-card .website-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.website-card .default-icon {
    background: var(--gradient-main);
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.website-card .card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.website-card .category-tag {
    background: rgba(102, 126, 234, 0.12);
    color: #667eea;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.website-card:hover .category-tag {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.website-card .visit-count {
    background: rgba(118, 75, 162, 0.12);
    color: #764ba2;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.website-card:hover .visit-count {
    background: rgba(118, 75, 162, 0.2);
    transform: scale(1.05);
}

.website-card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.website-card .website-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    line-height: 1.3;
    flex-shrink: 0;
}

.website-card:hover .website-title {
    color: #667eea;
}

.website-card .website-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    font-weight: 500;
    flex: 1;
    /* 固定描述区域高度 */
    height: 72px;
    margin-bottom: 18px;
}

.website-card:hover .website-description {
    color: #333;
}

.website-card .website-url {
    display: flex;
    align-items: center;
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 20px;
    transition: color 0.3s ease;
    font-weight: 600;
    flex-shrink: 0;
}

.website-card:hover .website-url {
    color: #667eea;
}

.website-card .website-url i {
    margin-right: 6px;
    font-size: 1rem;
}

.website-card .card-footer {
    margin-top: auto;
    flex-shrink: 0;
}

.website-card .visit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}

.website-card .visit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.8s ease;
}

.website-card .visit-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    color: white;
}

.website-card .visit-btn:hover::before {
    left: 100%;
}

.website-card .visit-btn i {
    margin-left: 8px;
    font-size: 1rem;
    transition: transform 0.3s ease;
    color: white;
}

.website-card .visit-btn:hover i {
    transform: translateX(5px);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state .empty-icon {
    font-size: 4rem;
    color: #e2e8f0;
    margin-bottom: 30px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.empty-state h4 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 700;
}

.empty-state p {
    color: #718096;
    font-size: 1.1rem;
    font-weight: 500;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #667eea;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 85%;
    height: 85%;
    top: 7.5%;
    left: 7.5%;
    border-top-color: #764ba2;
    animation-duration: 2s;
}

.spinner-ring:nth-child(3) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: #f093fb;
    animation-duration: 2.5s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #667eea;
    font-weight: 600;
    font-size: 1.2rem;
    animation: pulse 2s ease-in-out infinite;
}

/* 按钮样式 */
.btn {
    border-radius: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: white;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    border-color: transparent;
    color: white;
}

.btn-outline-primary.active,
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

/* 图标样式 */
.website-icon {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.website-icon:hover {
    transform: scale(1.1);
}

.website-icon-placeholder {
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 加载动画 */
.spinner-border {
    color: #667eea;
    width: 3rem;
    height: 3rem;
}

/* 徽章样式 */
.badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
}

/* 主容器 */
.main-container {
    position: relative;
    min-height: calc(100vh - 100px);
    padding-bottom: 5rem;
    z-index: 1;
    background: transparent;
}

/* 英雄区域 */
.hero-section {
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    background: transparent;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.admin-button-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.admin-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    text-decoration: none;
    border-radius: 50px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.admin-btn:hover {
    background: var(--gradient-main);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    color: white;
    border-color: transparent;
}

.hero-title {
    margin-top: 60px;
}

.main-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    letter-spacing: -2px;
}

.title-word {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleFloat 4s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.3s);
    font-weight: 900;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.title-word:nth-child(1) { --i: 0; }
.title-word:nth-child(2) { --i: 1; }
.title-word:nth-child(3) { --i: 2; }
.title-word:nth-child(4) { --i: 3; }

@keyframes titleFloat {
    0%, 100% { 
        transform: translateY(0) scale(1); 
        filter: brightness(1);
    }
    50% { 
        transform: translateY(-10px) scale(1.05); 
        filter: brightness(1.2);
    }
}

.subtitle-container {
    position: relative;
    margin-bottom: 40px;
}

.subtitle {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 25px;
    font-weight: 500;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.subtitle-line {
    width: 120px;
    height: 4px;
    background: var(--gradient-accent);
    margin: 0 auto;
    border-radius: 2px;
    animation: lineExpand 2s ease-out 1s;
    box-shadow: 0 2px 10px rgba(240, 147, 251, 0.3);
}

@keyframes lineExpand {
    from { 
        width: 0; 
        opacity: 0;
    }
    to { 
        width: 120px; 
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 搜索区域 */
.search-section {
    padding: 50px 20px;
    background: transparent;
    border-top: 1px solid rgba(240, 240, 240, 0.5);
    border-bottom: 1px solid rgba(240, 240, 240, 0.5);
    position: relative;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(240, 147, 251, 0.02) 100%);
    z-index: 0;
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 筛选功能样式 */
.filter-section {
    display: flex;
    justify-content: center;
}

.filter-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.filter-icon {
    position: absolute;
    left: 25px;
    color: #666;
    font-size: 1.2rem;
    z-index: 2;
    transition: color 0.3s ease;
}

.filter-input {
    width: 100%;
    padding: 16px 25px 16px 65px;
    border: 2px solid rgba(118, 75, 162, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 1rem;
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding-right: 120px;
}

.filter-input::placeholder {
    color: #718096;
    font-weight: 500;
}

.filter-input:focus {
    border-color: #764ba2;
    background: white;
    box-shadow: 0 0 0 6px rgba(118, 75, 162, 0.15), 0 12px 40px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.filter-input:focus + .filter-icon {
    color: #764ba2;
}

.filter-clear {
    position: absolute;
    right: 80px;
    background: rgba(118, 75, 162, 0.1);
    border: none;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.filter-clear:hover {
    background: rgba(118, 75, 162, 0.2);
    color: #333;
    transform: scale(1.1) rotate(90deg);
}

.filter-label {
    position: absolute;
    right: 15px;
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(118, 75, 162, 0.4);
    pointer-events: none;
}

.search-engines-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.search-engine-tab {
    background: rgba(102, 126, 234, 0.15);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 25px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.search-engine-tab i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.search-engine-tab:hover {
    background: rgba(102, 126, 234, 0.25);
    color: #2d3748;
    transform: translateY(-2px) scale(1.05);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

.search-engine-tab:hover i {
    transform: scale(1.2);
}

.search-engine-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.search-engine-tab.active i {
    color: white;
    transform: scale(1.1);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 25px;
    color: #666;
    font-size: 1.3rem;
    z-index: 2;
    transition: color 0.3s ease;
}

.search-input {
    width: 100%;
    padding: 20px 25px 20px 70px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    padding-right: 120px;
}

.search-input::placeholder {
    color: #718096;
    font-weight: 500;
}

.search-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.15), 0 12px 40px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.search-input:focus + .search-icon {
    color: #667eea;
}

.search-clear {
    position: absolute;
    right: 80px;
    background: rgba(102, 126, 234, 0.1);
    border: none;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.search-clear:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #333;
    transform: scale(1.1) rotate(90deg);
}

.search-button {
    position: absolute;
    right: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    position: relative;
    overflow: hidden;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.8s ease;
}

.search-button:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 50%, #764ba2 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
    color: white;
}

.search-button:hover::before {
    left: 100%;
}

.search-button:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.7);
}

/* 分类区域 */
.categories-section {
    padding: 80px 20px 60px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.categories-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
}

.categories-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-main);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.section-title i {
    color: var(--primary-color);
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 30px;
    background: rgba(102, 126, 234, 0.12);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    color: #2d3748;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
}

.category-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.category-chip > * {
    position: relative;
    z-index: 1;
}

.category-chip:hover::before,
.category-chip.active::before {
    left: 0;
}

.category-chip:hover,
.category-chip.active {
    color: white;
    border-color: transparent;
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
}

.category-chip.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.category-chip.active::before {
    left: 0;
}

.category-icon {
    font-size: 1.4rem;
    transition: transform 0.4s ease;
}

.category-chip:hover .category-icon,
.category-chip.active .category-icon {
    transform: scale(1.3) rotate(10deg);
}

.category-name {
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.category-count {
    background: rgba(102, 126, 234, 0.25);
    color: #4a5568;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.3s ease;
    min-width: 30px;
    text-align: center;
}

.category-chip:hover .category-count,
.category-chip.active .category-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: scale(1.1);
}

/* 网站展示区域 */
.websites-section {
    padding: 60px 20px 100px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.websites-container {
    max-width: 1400px;
    margin: 0 auto;
}

.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* 网站详情模态框 */
.website-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.website-detail-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    width: 90%;
    max-width: 650px;
    background: white;
    border-radius: 24px;
    position: relative;
    z-index: 1001;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
    transform: translateY(50px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.website-detail-modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #333;
    margin: 0;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-close {
    background: rgba(102, 126, 234, 0.1);
    border: none;
    font-size: 1.3rem;
    color: #666;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.modal-close:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #333;
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    padding: 30px;
}

.website-detail-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.website-detail-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    background: white;
}

.website-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.website-detail-icon .default-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-main);
    color: white;
    font-size: 48px;
}

.website-detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.website-detail-category {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.website-detail-url {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
}

.website-detail-url a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 700;
}

.website-detail-url a:hover {
    text-decoration: underline;
    color: #764ba2;
}

.website-detail-description {
    margin-top: 15px;
    text-align: center;
}

.website-detail-description h4 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.website-detail-description p {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 500;
}

.modal-footer {
    padding: 30px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
}

.modal-footer .visit-btn {
    width: 100%;
    max-width: 250px;
    padding: 16px 32px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.modal-footer .visit-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    color: white;
}

.modal-footer .visit-btn i {
    color: white;
    transition: transform 0.3s ease;
}

.modal-footer .visit-btn:hover i {
    transform: translateX(5px);
    color: white;
}

/* 英雄背景动画 */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.floating-bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(240, 147, 251, 0.15) 100%);
    animation: float 20s linear infinite;
    animation-delay: var(--delay);
    width: var(--size);
    height: var(--size);
    opacity: 0.6;
    filter: blur(1px);
}

.bubble:nth-child(odd) {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.15) 0%, rgba(245, 87, 108, 0.15) 100%);
}

.bubble:nth-child(1) { top: 10%; left: 10%; }
.bubble:nth-child(2) { top: 20%; left: 80%; }
.bubble:nth-child(3) { top: 30%; left: 30%; }
.bubble:nth-child(4) { top: 40%; left: 70%; }
.bubble:nth-child(5) { top: 50%; left: 20%; }
.bubble:nth-child(6) { top: 60%; left: 90%; }
.bubble:nth-child(7) { top: 70%; left: 40%; }
.bubble:nth-child(8) { top: 80%; left: 60%; }
.bubble:nth-child(9) { top: 90%; left: 10%; }
.bubble:nth-child(10) { top: 10%; left: 50%; }
.bubble:nth-child(11) { top: 30%; left: 85%; }
.bubble:nth-child(12) { top: 50%; left: 50%; }
.bubble:nth-child(13) { top: 70%; left: 15%; }
.bubble:nth-child(14) { top: 90%; left: 90%; }
.bubble:nth-child(15) { top: 20%; left: 40%; }

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(40px, -60px) rotate(90deg) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translate(-30px, 30px) rotate(180deg) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translate(50px, -40px) rotate(270deg) scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
        opacity: 0.6;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .admin-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .search-container {
        padding: 0 15px;
    }

    .search-input {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .filter-input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .filter-icon {
        font-size: 1rem;
    }

    .filter-clear {
        width: 30px;
        height: 30px;
    }

    .filter-label {
        font-size: 0.9rem;
    }

    .websites-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    /* 移动端卡片高度调整 */
    .website-card {
        height: 320px;
    }
    
    .website-card .card-inner {
        padding: 20px;
    }
    
    .website-card .website-description {
        height: 60px;
        font-size: 0.9rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .category-chip {
        padding: 10px 15px;
    }

    .search-engines-tabs {
        justify-content: center;
        gap: 8px;
    }

    .search-engine-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .modal-content {
        margin: 10px;
    }

    .hero-section {
        padding: 60px 0 40px;
    }

    .categories-section {
        padding: 40px 20px;
    }

    .websites-section {
        padding: 40px 20px 80px;
    }
}

@media (max-width: 480px) {
    .admin-button-container {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1000;
    }

    .admin-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        padding: 0;
    }

    .admin-btn span {
        display: none;
    }

    .hero-section {
        padding: 40px 0 30px;
    }

    .main-title {
        font-size: 2rem;
    }

    .search-section {
        padding: 30px 15px;
    }

    .categories-section {
        padding: 30px 15px;
    }

    .websites-section {
        padding: 30px 15px 60px;
    }
    
    /* 小屏幕卡片进一步调整 */
    .website-card {
        height: 300px;
    }

    .website-card .card-header {
        margin-bottom: 15px;
    }

    .website-card .category-tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .website-card .website-description {
        height: 54px;
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .search-engines-tabs {
        display: none;
    }

    .search-engine-tab {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .search-button {
        padding: 12px 20px;
        font-size: 0.9rem;
        border-radius: 50px;
    }

    .search-button:hover {
        transform: none;
    }

    .search-input {
        font-size: 16px; /* 防止iOS缩放 */
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
} 